package com.zretc.kscxmz.controller;

import com.zretc.kscxmz.entity.Role;
import com.zretc.kscxmz.services.RoleListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private RoleListService roleListService;
//角色列表
    @RequestMapping("/roleList")
    @ResponseBody
    public List<Role> getRoleList(){

        List<Role> roleList = roleListService.getRoleList();
        return roleList;
    }
}
